package com.cy.train.common.exception;

/**
 * @Description: 自定义异常枚举类
 * @Date: 2024/2/26 8:47
 * @Author: cyzhang
 */
public enum BusinessExceptionEnum {
    MEMBER_MOBILE_EXIST("用户手机号已注册"),
    MEMBER_MOBILE_NOT_EXIST("请先获取验证码注册"),
    MEMBER_MOBILE_CODE_ERROR("验证码错误"),
    TRAIN_STATION_NAME_UNIQUE_ERROR("车站已存在"),
    TRAIN_CARRIAGE_CODE_INDEX_UNIQUE_ERROR("同车次同厢序车厢已存在"),
    TRAIN_CODE_UNIQUE_ERROR("同编号车次已存在"),
    TRAIN_STATION_CODE_INDEX_UNIQUE_ERROR("同车次同站序车站已存在"),
    TRAIN_STATION_CODE_NAME_UNIQUE_ERROR("同车次同站名车站已存在"),
    CONFIRM_ORDER_TICKET_EMPTY("余票不足"),
    CONFIRM_ORDER_SAVE_ERROR("保存购票信息失败"),
    TICKET_LOCK_ERROR("当前抢票人数过多，请稍后重试");

    private String desc;

    BusinessExceptionEnum(String message) {
        this.desc = message;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    @Override
    public String toString() {
        return "BusinessExceptionEnum{" +
                "message='" + desc + '\'' +
                '}';
    }
}
